<form class="layui-form ajax" style = "padding:12px;" action="{if condition="isset($data.id)"}{:url('goAdd','id='.$data['id'])}{else /}{:url('goAdd')}{/if}" method="post">
<div class="layui-form-item">
    <label class="layui-form-label" > 权限名称 </label>
    <div class="layui-input-block">
        <input type="text" name="auth_name" value="{$data.auth_name|default=''}" required  lay-verify="required" class="layui-input" placeholder="请输入权限组名称" required/ >
    </div>
</div>
<div class="layui-form-item">
    <label class="layui-form-label" > 备注 </label>
    <div class="layui-input-block">
        <textarea rows="3" cols="20" name="auth_remark" class="layui-textarea" placeholder="请输入备注">{$data.auth_remark|default=''}</textarea>
    </div>
</div>
<div class="layui-form-item">
    <label class="layui-form-label" > 是否启用 </label>
    <div class="layui-input-block">
        {if condition="isset($data.id)"}
        {if condition="$data.status eq '1'"}<input type="checkbox" name="status"  checked title="启用" lay-skin="switch">{else /}<input type="checkbox" name="status"  lay-skin="switch">{/if}
        {else /}
        <input type="checkbox" name="status"  lay-skin="switch" checked>
        {/if}
    </div>
</div>
<div class="layui-form-item" style = "text-align:center;">
    <button class="layui-btn layui-btn-success" type="submit">
        <i class="layui-icon layui-icon-ok"></i> 保存
    </button> &nbsp; &nbsp; &nbsp;
</div>
</form>
